<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>flightManageDetail 航班计划详情</title>
	</head>
	<link rel="stylesheet" href="../css/common.css" />
	<style>
		#main{
			width:900px;			
			margin:30px auto;
			
			
		}
		#main table{
			width:900px;
			margin-bottom:5px;
		}		
		td{	
			width:150px;
			border-bottom:1px solid #eeeeee;
			height:45px;
		}
		.aircftMess,.nodeMess{
			text-align:left;
		}
		.aircftMess>span{
			margin-right:10px;
		}
		.nodeMess>span{
			margin-right:10px;
		}
		.aircftMess>span>span{
			color:#00aa98;
			margin-left:5px;
		}
		.nodeMess>span>span{
			color:#00aa98;
			margin-left:5px;
		}
		.skStatus{
			text-align:left;
		}
	</style>
	<body>	
		<div id="main">
			<table>				
				<tbody class='clear'>
					<tr>						
						<td style="color:#00aa98;">散客信息</td>
						<td class='skStatus' colspan="5">
							
						</td>
					</tr>		
					<tr>						
						<td style="color:#00aa98;">机型信息</td>
						<td class='aircftMess' colspan="5">
							<span>航班机型<span class="val1"></span></span>
							<span>头等舱座位数<span class="val2"></span></span>
							<span>商务舱座位数<span class="val3"></span></span>
							<span>经济舱座位数<span class="val4"></span></span>
							<span>座位总数<span class="val5"></span></span>
							<span>婴儿限制数<span class="val6"></span></span>
						</td>
					</tr>					
				</tbody>
			</table>			
		</div>
		<script type="text/javascript" src="../js/jquery-1.12.4.js" ></script>	
		<script type="text/javascript" src="../js/common.js" ></script>		
		<script>
			var schFltId = getHref().schFltId;
			$.ajax({
				type:"get",
				url:"../flightSchedule/api/flightDetail?schFltId="+schFltId+"&temp="+Math.random(),
				async:false,
				dataType:"json",
				success:function(data){					
					var data = data.data;
					//机型信息
					$(".val1").text(data.aircraft);                     
					$(".val2").text(data.fseat);
					$(".val3").text(data.cseat);
					$(".val4").text(data.yseat);
					$(".val5").text(data.fseat+data.yseat+data.cseat);
					$(".val6").text(data.infantLimit);
					//散客信息
					$(".skStatus").text(commomFun.skTypeToStr(data.skStatus));
					//航节信息
					var legs = data.legs;
					var str = "";
					for(var i=0;i<legs.length;i++){
						var str1 = "";
						var str2 = "";
						if(legs[i].depDc=="0"){
							str1 += "";
						}else{
							str1 += "+"+legs[i].depDc;
						}
						if(legs[i].arrDc=="0"){
							str2 += "";
						}else{
							str2 += "+"+legs[i].arrDc;
						}
						str+="<tr>" +
								"<td style=color:#00aa98;>航节信息</td>" +
								"<td class=nodeMess colspan=5>" +
									"<span>出发<span>"+legs[i].depCn+"("+legs[i].dep+")/"+legs[i].depTerminal+"/"+legs[i].depTime+str1+"</span></span>" +
									"<span>到达<span>"+legs[i].arrCn+"("+legs[i].arr+")/"+legs[i].arrTerminal+"/"+legs[i].arrTime+str2+"</span></span>" +
									//"<span>承运航班<span>"+legs[i].oC+"</span></span>" +
								"</td>" +
							 "</tr>";
					}
					$(".clear").append(str);
				}
			})
		</script>
	</body>
</html>
